//
//  WKLoginResp.m
//  WuKongUsernameLogin
//
//  Created by tt on 2023/9/15.
//

#import "WKLoginResp.h"

@implementation WKLoginResp


+(WKModel*) fromMap:(NSDictionary*)dictory type:(ModelMapType)type{
    WKLoginResp *loginResp = [WKLoginResp new];
    loginResp.uid = dictory[@"uid"];
    loginResp.shortNo = dictory[@"short_no"]?:@"";
    loginResp.name = dictory[@"name"];
    loginResp.username = dictory[@"username"]?:@"";
    loginResp.sex = dictory[@"sex"]?:@(0);
    loginResp.zone = dictory[@"zone"]?:@"";
    loginResp.phone = dictory[@"phone"]?:@"";
    loginResp.token = dictory[@"token"];
    loginResp.imToken = dictory[@"im_token"];
    loginResp.avatar = dictory[@"avatar"];
    loginResp.shortStatus = dictory[@"short_status"]?:@(0);
    loginResp.serverID = dictory[@"server_id"]?:@(1);
    loginResp.chatPwd = dictory[@"chat_pwd"]?:@"";
    loginResp.lockScreenPwd = dictory[@"lock_screen_pwd"]?:@"";
    loginResp.lockAfterMinute = dictory[@"lock_after_minute"]?:@(0);
    if(dictory[@"setting"]) {
        loginResp.setting = dictory[@"setting"];
    }
    loginResp.rsaPublicKey = dictory[@"rsa_public_key"];
    return loginResp;
}

@end
